package com.shujia.extends_.exer;

// 老师类继承人类（工号，教龄，教书）
public class Teacher extends Person {

    private String workNo;
    private int teachYear;


    public void teach() {
        System.out.println("teach...");
    }

    public String getWorkNo() {
        return workNo;
    }

    public void setWorkNo(String workNo) {
        this.workNo = workNo;
    }

    public int getTeachYear() {
        return teachYear;
    }

    public void setTeachYear(int teachYear) {
        this.teachYear = teachYear;
    }
}
